<!-- HTML header for doxygen 1.8.8-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <!-- For Mobile Devices -->
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
        <meta name="generator" content="Doxygen 1.8.18"/>
        <script type="text/javascript" src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
        <title>HElib: /HElib/include/helib/timing.h Source File</title>
        <!--<link href="tabs.css" rel="stylesheet" type="text/css"/>-->
        <script type="text/javascript" src="dynsections.js"></script>
        <link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
        <link href="doxygen.css" rel="stylesheet" type="text/css" />
        <link href="customdoxygen.css" rel="stylesheet" type="text/css"/>
        <link href='https://fonts.googleapis.com/css?family=Roboto+Slab' rel='stylesheet' type='text/css'>
		<link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:ital,wght@0,100;1,700&family=Merriweather&family=Merriweather+Sans&family=Open+Sans&family=Poppins:ital@1&family=Roboto:ital,wght@0,400;1,300;1,900&display=swap" rel="stylesheet"> 
        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
        <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
        <link href="jquery.smartmenus.bootstrap.css" rel="stylesheet">
        <script type="text/javascript" src="jquery.smartmenus.js"></script>
        <!-- SmartMenus jQuery Bootstrap Addon -->
        <script type="text/javascript" src="jquery.smartmenus.bootstrap.js"></script>
        <!-- SmartMenus jQuery plugin -->
    </head>
    <body style="font-family: 'Merriweather', serif;">
        <nav class="navbar navbar-default" role="navigation">
            <div class="container">
                <div class="navbar-header">
                    <a class="navbar-brand">HElib Implementing Homomorphic Encryption</a>
                </div>
            </div>
        </nav>
        <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
            <div class="content" id="content">
                <div class="container">
                    <div class="row">
                        <div class="col-sm-12 panel " style="padding-bottom: 15px;">
                            <div style="margin-bottom: 15px;">
<!-- end header part -->
<!-- Generated by Doxygen 1.8.18 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_d0c4ae63660968bf6b1c77a1e8aecf95.html">helib</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">timing.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="timing_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/* Copyright (C) 2012-2020 IBM Corp.</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> * This program is Licensed under the Apache License, Version 2.0</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> * (the &quot;License&quot;); you may not use this file except in compliance</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> * with the License. You may obtain a copy of the License at</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> *   http://www.apache.org/licenses/LICENSE-2.0</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> * Unless required by applicable law or agreed to in writing, software</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"> * distributed under the License is distributed on an &quot;AS IS&quot; BASIS,</span></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment"> * See the License for the specific language governing permissions and</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment"> * limitations under the License. See accompanying LICENSE file.</span></div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;<span class="preprocessor">#ifndef HELIB_TIMING_H</span></div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;<span class="preprocessor">#define HELIB_TIMING_H</span></div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160; </div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="_numb_th_8h.html">helib/NumbTh.h</a>&gt;</span></div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="multicore_8h.html">helib/multicore.h</a>&gt;</span></div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160; </div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespacehelib.html">helib</a> {</div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160; </div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;<span class="keyword">class </span>FHEtimer;</div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;<span class="keywordtype">void</span> <a class="code" href="namespacehelib.html#a7957fca02eb250ab71f07ae1e03f4f5c">registerTimer</a>(FHEtimer* timer);</div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <a class="code" href="namespacehelib.html#a73d5dae8af9bd253bc591ea37db51a58">GetTimerClock</a>();</div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160; </div>
<div class="line"><a name="l00044"></a><span class="lineno"><a class="line" href="classhelib_1_1_f_h_etimer.html">   44</a></span>&#160;<span class="keyword">class </span><a class="code" href="classhelib_1_1_f_h_etimer.html">FHEtimer</a></div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;{</div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00047"></a><span class="lineno"><a class="line" href="classhelib_1_1_f_h_etimer.html#affc0584acd065e0f04264cade4d85e08">   47</a></span>&#160;  <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="classhelib_1_1_f_h_etimer.html#affc0584acd065e0f04264cade4d85e08">name</a>;</div>
<div class="line"><a name="l00048"></a><span class="lineno"><a class="line" href="classhelib_1_1_f_h_etimer.html#a4dc72ef60715aee1ed9de76f176b2e34">   48</a></span>&#160;  <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="classhelib_1_1_f_h_etimer.html#a4dc72ef60715aee1ed9de76f176b2e34">loc</a>;</div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160; </div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;  <span class="comment">// THREADS: these need to be atomic</span></div>
<div class="line"><a name="l00051"></a><span class="lineno"><a class="line" href="classhelib_1_1_f_h_etimer.html#ae9d1a44d1fe3bb1e0a778d19c82f929b">   51</a></span>&#160;  <a class="code" href="multicore_8h.html#a5ee2ac1cdae82f4a579143ff39513de8">HELIB_atomic_ulong</a> <a class="code" href="classhelib_1_1_f_h_etimer.html#ae9d1a44d1fe3bb1e0a778d19c82f929b">counter</a>;</div>
<div class="line"><a name="l00052"></a><span class="lineno"><a class="line" href="classhelib_1_1_f_h_etimer.html#aea72d5884d4d88e6dd47a29c9d7a53d2">   52</a></span>&#160;  <a class="code" href="multicore_8h.html#a7c90ab9d0567056e6b5325f59f3822fc">HELIB_atomic_long</a> <a class="code" href="classhelib_1_1_f_h_etimer.html#aea72d5884d4d88e6dd47a29c9d7a53d2">numCalls</a>;</div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160; </div>
<div class="line"><a name="l00054"></a><span class="lineno"><a class="line" href="classhelib_1_1_f_h_etimer.html#a1bcd92df28881753380670ec024e5f2b">   54</a></span>&#160;  <a class="code" href="classhelib_1_1_f_h_etimer.html#a1bcd92df28881753380670ec024e5f2b">FHEtimer</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* _name, <span class="keyword">const</span> <span class="keywordtype">char</span>* _loc) :</div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;      <a class="code" href="classhelib_1_1_f_h_etimer.html#affc0584acd065e0f04264cade4d85e08">name</a>(_name), <a class="code" href="classhelib_1_1_f_h_etimer.html#a4dc72ef60715aee1ed9de76f176b2e34">loc</a>(_loc), <a class="code" href="classhelib_1_1_f_h_etimer.html#ae9d1a44d1fe3bb1e0a778d19c82f929b">counter</a>(0), <a class="code" href="classhelib_1_1_f_h_etimer.html#aea72d5884d4d88e6dd47a29c9d7a53d2">numCalls</a>(0)</div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;  {</div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;    <a class="code" href="namespacehelib.html#a7957fca02eb250ab71f07ae1e03f4f5c">registerTimer</a>(<span class="keyword">this</span>);</div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;  }</div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160; </div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;  <span class="keywordtype">void</span> <a class="code" href="classhelib_1_1_f_h_etimer.html#a09daf343cd5df4963fe7da0b48a6e3ae">reset</a>();</div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;  <span class="keywordtype">double</span> <a class="code" href="classhelib_1_1_f_h_etimer.html#ae555675bad3900bbb9d9eb972c8521f0">getTime</a>() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;  <span class="keywordtype">long</span> <a class="code" href="classhelib_1_1_f_h_etimer.html#af44f276203c082f0ce72b97c01815334">getNumCalls</a>() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;};</div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160; </div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;<span class="comment">// backward compatibility: timers are always on</span></div>
<div class="line"><a name="l00066"></a><span class="lineno"><a class="line" href="namespacehelib.html#a84fe94a9675113ebaf52d87806572cf8">   66</a></span>&#160;<span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="namespacehelib.html#a84fe94a9675113ebaf52d87806572cf8">setTimersOn</a>() {}</div>
<div class="line"><a name="l00067"></a><span class="lineno"><a class="line" href="namespacehelib.html#a4672b8f7cb141fc61055c0ccf5f09e56">   67</a></span>&#160;<span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="namespacehelib.html#a4672b8f7cb141fc61055c0ccf5f09e56">setTimersOff</a>() {}</div>
<div class="line"><a name="l00068"></a><span class="lineno"><a class="line" href="namespacehelib.html#ad94c1a39dcabf4a83066a2908a02e274">   68</a></span>&#160;<span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="namespacehelib.html#ad94c1a39dcabf4a83066a2908a02e274">areTimersOn</a>() { <span class="keywordflow">return</span> <span class="keyword">true</span>; }</div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160; </div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;<span class="keyword">const</span> FHEtimer* <a class="code" href="namespacehelib.html#ad19aadcc92555c2f4dbb3b3b34ae6633">getTimerByName</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* name);</div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160; </div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;<span class="keywordtype">void</span> <a class="code" href="namespacehelib.html#a3203575203906fc8b66bef7fe7a577cd">resetAllTimers</a>();</div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160; </div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;<span class="keywordtype">void</span> <a class="code" href="namespacehelib.html#a2a544a973c30afed0df368cda6e0ad9e">printAllTimers</a>(std::ostream&amp; str = std::cerr);</div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160; </div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;<span class="comment">// return true if timer was found, false otherwise</span></div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;<span class="keywordtype">bool</span> <a class="code" href="namespacehelib.html#a0def7d8004a69413ec72c12f1b2bdfe2">printNamedTimer</a>(std::ostream&amp; str, <span class="keyword">const</span> <span class="keywordtype">char</span>* name);</div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160; </div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;<span class="keyword">class </span>auto_timer</div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;{</div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;  FHEtimer* timer;</div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;  <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> amt;</div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;  <span class="keywordtype">bool</span> running;</div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160; </div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;  auto_timer(FHEtimer* _timer) :</div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;      timer(_timer), amt(<a class="code" href="namespacehelib.html#a73d5dae8af9bd253bc591ea37db51a58">GetTimerClock</a>()), running(true)</div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;  {}</div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160; </div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;  <span class="keywordtype">void</span> stop()</div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;  {</div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;    amt = <a class="code" href="namespacehelib.html#a73d5dae8af9bd253bc591ea37db51a58">GetTimerClock</a>() - amt;</div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;    timer-&gt;counter += amt;</div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;    timer-&gt;numCalls++;</div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;    running = <span class="keyword">false</span>;</div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;  }</div>
<div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160; </div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;  ~auto_timer()</div>
<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;  {</div>
<div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;    <span class="keywordflow">if</span> (running)</div>
<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;      stop();</div>
<div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;  }</div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;};</div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160; </div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;<span class="comment">// NOTE: the STOP functions below are not really needed,</span></div>
<div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;<span class="comment">// but are provided for backward compatibility</span></div>
<div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160; </div>
<div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;<span class="preprocessor">#define HELIB_STRINGIFY(x) #x</span></div>
<div class="line"><a name="l00112"></a><span class="lineno"><a class="line" href="timing_8h.html#aa15a8cee5b9212ace22a8f2c64fb9d64">  112</a></span>&#160;<span class="preprocessor">#define HELIB_TOSTRING(x) HELIB_STRINGIFY(x)</span></div>
<div class="line"><a name="l00113"></a><span class="lineno"><a class="line" href="timing_8h.html#a851887446ce1d3a4c174e79837b2e161">  113</a></span>&#160;<span class="preprocessor">#define HELIB_AT __FILE__ &quot;:&quot; HELIB_TOSTRING(__LINE__)</span></div>
<div class="line"><a name="l00114"></a><span class="lineno"><a class="line" href="timing_8h.html#a9e074260b42eda6fa27f079df942ba55">  114</a></span>&#160; </div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;<span class="preprocessor">#define HELIB_stringify_aux(s) #s</span></div>
<div class="line"><a name="l00116"></a><span class="lineno"><a class="line" href="timing_8h.html#a9b38b16c04c53fc718033a36b98ee11c">  116</a></span>&#160;<span class="preprocessor">#define HELIB_stringify(s) HELIB_stringify_aux(s)</span></div>
<div class="line"><a name="l00117"></a><span class="lineno"><a class="line" href="timing_8h.html#ad0a2f15dbfce7bc747a497f82620a8b5">  117</a></span>&#160; </div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;<span class="preprocessor">#define HELIB_TIMER_START                                                      \</span></div>
<div class="line"><a name="l00119"></a><span class="lineno"><a class="line" href="timing_8h.html#adfc4a47dcae41acfbca01a5d9b3ad95a">  119</a></span>&#160;<span class="preprocessor">  static helib::FHEtimer _local_timer(__func__, HELIB_AT);                     \</span></div>
<div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;<span class="preprocessor">  helib::auto_timer _local_auto_timer(&amp;_local_timer)</span></div>
<div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160; </div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;<span class="preprocessor">#define HELIB_TIMER_STOP _local_auto_timer.stop()</span></div>
<div class="line"><a name="l00123"></a><span class="lineno"><a class="line" href="timing_8h.html#ad37c9172b8d4602395805c1c325032c2">  123</a></span>&#160; </div>
<div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;<span class="preprocessor">#define HELIB_NTIMER_START(n)                                                  \</span></div>
<div class="line"><a name="l00125"></a><span class="lineno"><a class="line" href="timing_8h.html#ae38f21dc74836c9d4babaf4371b70178">  125</a></span>&#160;<span class="preprocessor">  static helib::FHEtimer _named_local_timer##n(#n, HELIB_AT);                  \</span></div>
<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;<span class="preprocessor">  helib::auto_timer _named_local_auto_timer##n(&amp;_named_local_timer##n)</span></div>
<div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160; </div>
<div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;<span class="preprocessor">#define HELIB_NTIMER_STOP(n) _named_local_auto_timer##n.stop();</span></div>
<div class="line"><a name="l00129"></a><span class="lineno"><a class="line" href="timing_8h.html#ab20c37869df3346ae92315e56e0f4a68">  129</a></span>&#160; </div>
<div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;} <span class="comment">// namespace helib</span></div>
<div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160; </div>
<div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;<span class="preprocessor">#endif // ifndef HELIB_TIMING_H</span></div>
</div><!-- fragment --></div><!-- contents -->
<div class="ttc" id="anamespacehelib_html_ad94c1a39dcabf4a83066a2908a02e274"><div class="ttname"><a href="namespacehelib.html#ad94c1a39dcabf4a83066a2908a02e274">helib::areTimersOn</a></div><div class="ttdeci">bool areTimersOn()</div><div class="ttdef"><b>Definition:</b> timing.h:68</div></div>
<div class="ttc" id="aclasshelib_1_1_f_h_etimer_html"><div class="ttname"><a href="classhelib_1_1_f_h_etimer.html">helib::FHEtimer</a></div><div class="ttdoc">A simple class to accumulate time.</div><div class="ttdef"><b>Definition:</b> timing.h:45</div></div>
<div class="ttc" id="aclasshelib_1_1_f_h_etimer_html_affc0584acd065e0f04264cade4d85e08"><div class="ttname"><a href="classhelib_1_1_f_h_etimer.html#affc0584acd065e0f04264cade4d85e08">helib::FHEtimer::name</a></div><div class="ttdeci">const char * name</div><div class="ttdef"><b>Definition:</b> timing.h:47</div></div>
<div class="ttc" id="anamespacehelib_html_a73d5dae8af9bd253bc591ea37db51a58"><div class="ttname"><a href="namespacehelib.html#a73d5dae8af9bd253bc591ea37db51a58">helib::GetTimerClock</a></div><div class="ttdeci">unsigned long GetTimerClock()</div><div class="ttdef"><b>Definition:</b> timing.cpp:41</div></div>
<div class="ttc" id="anamespacehelib_html_a4672b8f7cb141fc61055c0ccf5f09e56"><div class="ttname"><a href="namespacehelib.html#a4672b8f7cb141fc61055c0ccf5f09e56">helib::setTimersOff</a></div><div class="ttdeci">void setTimersOff()</div><div class="ttdef"><b>Definition:</b> timing.h:67</div></div>
<div class="ttc" id="aclasshelib_1_1_f_h_etimer_html_ae9d1a44d1fe3bb1e0a778d19c82f929b"><div class="ttname"><a href="classhelib_1_1_f_h_etimer.html#ae9d1a44d1fe3bb1e0a778d19c82f929b">helib::FHEtimer::counter</a></div><div class="ttdeci">HELIB_atomic_ulong counter</div><div class="ttdef"><b>Definition:</b> timing.h:51</div></div>
<div class="ttc" id="a_numb_th_8h_html"><div class="ttname"><a href="_numb_th_8h.html">NumbTh.h</a></div><div class="ttdoc">Miscellaneous utility functions.</div></div>
<div class="ttc" id="aclasshelib_1_1_f_h_etimer_html_ae555675bad3900bbb9d9eb972c8521f0"><div class="ttname"><a href="classhelib_1_1_f_h_etimer.html#ae555675bad3900bbb9d9eb972c8521f0">helib::FHEtimer::getTime</a></div><div class="ttdeci">double getTime() const</div><div class="ttdef"><b>Definition:</b> timing.cpp:68</div></div>
<div class="ttc" id="amulticore_8h_html_a5ee2ac1cdae82f4a579143ff39513de8"><div class="ttname"><a href="multicore_8h.html#a5ee2ac1cdae82f4a579143ff39513de8">HELIB_atomic_ulong</a></div><div class="ttdeci">#define HELIB_atomic_ulong</div><div class="ttdef"><b>Definition:</b> multicore.h:40</div></div>
<div class="ttc" id="anamespacehelib_html_a84fe94a9675113ebaf52d87806572cf8"><div class="ttname"><a href="namespacehelib.html#a84fe94a9675113ebaf52d87806572cf8">helib::setTimersOn</a></div><div class="ttdeci">void setTimersOn()</div><div class="ttdef"><b>Definition:</b> timing.h:66</div></div>
<div class="ttc" id="amulticore_8h_html_a7c90ab9d0567056e6b5325f59f3822fc"><div class="ttname"><a href="multicore_8h.html#a7c90ab9d0567056e6b5325f59f3822fc">HELIB_atomic_long</a></div><div class="ttdeci">#define HELIB_atomic_long</div><div class="ttdef"><b>Definition:</b> multicore.h:39</div></div>
<div class="ttc" id="anamespacehelib_html_a3203575203906fc8b66bef7fe7a577cd"><div class="ttname"><a href="namespacehelib.html#a3203575203906fc8b66bef7fe7a577cd">helib::resetAllTimers</a></div><div class="ttdeci">void resetAllTimers()</div><div class="ttdef"><b>Definition:</b> timing.cpp:77</div></div>
<div class="ttc" id="anamespacehelib_html"><div class="ttname"><a href="namespacehelib.html">helib</a></div><div class="ttdef"><b>Definition:</b> apiAttributes.h:21</div></div>
<div class="ttc" id="anamespacehelib_html_a7957fca02eb250ab71f07ae1e03f4f5c"><div class="ttname"><a href="namespacehelib.html#a7957fca02eb250ab71f07ae1e03f4f5c">helib::registerTimer</a></div><div class="ttdeci">void registerTimer(FHEtimer *timer)</div><div class="ttdef"><b>Definition:</b> timing.cpp:54</div></div>
<div class="ttc" id="anamespacehelib_html_a0def7d8004a69413ec72c12f1b2bdfe2"><div class="ttname"><a href="namespacehelib.html#a0def7d8004a69413ec72c12f1b2bdfe2">helib::printNamedTimer</a></div><div class="ttdeci">bool printNamedTimer(std::ostream &amp;str, const char *name)</div><div class="ttdef"><b>Definition:</b> timing.cpp:116</div></div>
<div class="ttc" id="anamespacehelib_html_ad19aadcc92555c2f4dbb3b3b34ae6633"><div class="ttname"><a href="namespacehelib.html#ad19aadcc92555c2f4dbb3b3b34ae6633">helib::getTimerByName</a></div><div class="ttdeci">const FHEtimer * getTimerByName(const char *name)</div><div class="ttdef"><b>Definition:</b> timing.cpp:106</div></div>
<div class="ttc" id="aclasshelib_1_1_f_h_etimer_html_a1bcd92df28881753380670ec024e5f2b"><div class="ttname"><a href="classhelib_1_1_f_h_etimer.html#a1bcd92df28881753380670ec024e5f2b">helib::FHEtimer::FHEtimer</a></div><div class="ttdeci">FHEtimer(const char *_name, const char *_loc)</div><div class="ttdef"><b>Definition:</b> timing.h:54</div></div>
<div class="ttc" id="amulticore_8h_html"><div class="ttname"><a href="multicore_8h.html">multicore.h</a></div><div class="ttdoc">Support for multi-threaded implementations.</div></div>
<div class="ttc" id="aclasshelib_1_1_f_h_etimer_html_af44f276203c082f0ce72b97c01815334"><div class="ttname"><a href="classhelib_1_1_f_h_etimer.html#af44f276203c082f0ce72b97c01815334">helib::FHEtimer::getNumCalls</a></div><div class="ttdeci">long getNumCalls() const</div><div class="ttdef"><b>Definition:</b> timing.cpp:75</div></div>
<div class="ttc" id="aclasshelib_1_1_f_h_etimer_html_aea72d5884d4d88e6dd47a29c9d7a53d2"><div class="ttname"><a href="classhelib_1_1_f_h_etimer.html#aea72d5884d4d88e6dd47a29c9d7a53d2">helib::FHEtimer::numCalls</a></div><div class="ttdeci">HELIB_atomic_long numCalls</div><div class="ttdef"><b>Definition:</b> timing.h:52</div></div>
<div class="ttc" id="aclasshelib_1_1_f_h_etimer_html_a4dc72ef60715aee1ed9de76f176b2e34"><div class="ttname"><a href="classhelib_1_1_f_h_etimer.html#a4dc72ef60715aee1ed9de76f176b2e34">helib::FHEtimer::loc</a></div><div class="ttdeci">const char * loc</div><div class="ttdef"><b>Definition:</b> timing.h:48</div></div>
<div class="ttc" id="aclasshelib_1_1_f_h_etimer_html_a09daf343cd5df4963fe7da0b48a6e3ae"><div class="ttname"><a href="classhelib_1_1_f_h_etimer.html#a09daf343cd5df4963fe7da0b48a6e3ae">helib::FHEtimer::reset</a></div><div class="ttdeci">void reset()</div><div class="ttdef"><b>Definition:</b> timing.cpp:61</div></div>
<div class="ttc" id="anamespacehelib_html_a2a544a973c30afed0df368cda6e0ad9e"><div class="ttname"><a href="namespacehelib.html#a2a544a973c30afed0df368cda6e0ad9e">helib::printAllTimers</a></div><div class="ttdeci">void printAllTimers(std::ostream &amp;str=std::cerr)</div><div class="ttdoc">Print the value of all timers to stream.</div><div class="ttdef"><b>Definition:</b> timing.cpp:84</div></div>
<!-- HTML footer for doxygen 1.8.8-->
<!-- start footer part -->
</div>
</div>
</div>
</div>
</div>
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.18
</small></address>
</body>
        <script type="text/javascript" src="doxy-boot.js"></script>
</html>
